// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: dc2.proto
#ifndef GRPC_dc2_2eproto__INCLUDED
#define GRPC_dc2_2eproto__INCLUDED

#include "dc2.pb.h"

#include <grpc++/impl/codegen/async_stream.h>
#include <grpc++/impl/codegen/async_unary_call.h>
#include <grpc++/impl/codegen/method_handler_impl.h>
#include <grpc++/impl/codegen/proto_utils.h>
#include <grpc++/impl/codegen/rpc_method.h>
#include <grpc++/impl/codegen/service_type.h>
#include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/stub_options.h>
#include <grpc++/impl/codegen/sync_stream.h>

namespace grpc {
class CompletionQueue;
class Channel;
class RpcService;
class ServerCompletionQueue;
class ServerContext;
}  // namespace grpc

namespace dc2 {

class ChatHub final {
 public:
  static constexpr char const* service_full_name() {
    return "dc2.ChatHub";
  }
  class StubInterface {
   public:
    virtual ~StubInterface() {}
    // Channels enumerates channels registered on the server.
    //
    // It can work in streaming (if watch flag is set) or pagination mode.
    //
    // In streaming mode GetChannel never closes the stream,
    // sending all incremental updates of channel list.
    //
    // In pagination mode stream closes then specified limit is
    // reached, or enumeration reaches the end of the list.
    //
    // Server implementation should send at least SID, name and flags of the channel.
    // Other fields may be returned by ChannelInfo.
    std::unique_ptr< ::grpc::ClientReaderInterface< ::dc2::ChatChannel>> Channels(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request) {
      return std::unique_ptr< ::grpc::ClientReaderInterface< ::dc2::ChatChannel>>(ChannelsRaw(context, request));
    }
    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dc2::ChatChannel>> AsyncChannels(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request, ::grpc::CompletionQueue* cq, void* tag) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dc2::ChatChannel>>(AsyncChannelsRaw(context, request, cq, tag));
    }
    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dc2::ChatChannel>> PrepareAsyncChannels(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dc2::ChatChannel>>(PrepareAsyncChannelsRaw(context, request, cq));
    }
    // ChannelInfo returns detailed info about the channel specified.
    virtual ::grpc::Status ChannelInfo(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::dc2::ChatChannel* response) = 0;
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::ChatChannel>> AsyncChannelInfo(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::ChatChannel>>(AsyncChannelInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::ChatChannel>> PrepareAsyncChannelInfo(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::ChatChannel>>(PrepareAsyncChannelInfoRaw(context, request, cq));
    }
    // SetChannelOptions is mostly used to set join/leave statuses on channels.
    virtual ::grpc::Status SetChannelOptions(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::dc2::Empty* response) = 0;
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::Empty>> AsyncSetChannelOptions(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::Empty>>(AsyncSetChannelOptionsRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::Empty>> PrepareAsyncSetChannelOptions(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::Empty>>(PrepareAsyncSetChannelOptionsRaw(context, request, cq));
    }
  private:
    virtual ::grpc::ClientReaderInterface< ::dc2::ChatChannel>* ChannelsRaw(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request) = 0;
    virtual ::grpc::ClientAsyncReaderInterface< ::dc2::ChatChannel>* AsyncChannelsRaw(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
    virtual ::grpc::ClientAsyncReaderInterface< ::dc2::ChatChannel>* PrepareAsyncChannelsRaw(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::ChatChannel>* AsyncChannelInfoRaw(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::ChatChannel>* PrepareAsyncChannelInfoRaw(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::Empty>* AsyncSetChannelOptionsRaw(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::Empty>* PrepareAsyncSetChannelOptionsRaw(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::grpc::CompletionQueue* cq) = 0;
  };
  class Stub final : public StubInterface {
   public:
    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
    std::unique_ptr< ::grpc::ClientReader< ::dc2::ChatChannel>> Channels(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request) {
      return std::unique_ptr< ::grpc::ClientReader< ::dc2::ChatChannel>>(ChannelsRaw(context, request));
    }
    std::unique_ptr< ::grpc::ClientAsyncReader< ::dc2::ChatChannel>> AsyncChannels(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request, ::grpc::CompletionQueue* cq, void* tag) {
      return std::unique_ptr< ::grpc::ClientAsyncReader< ::dc2::ChatChannel>>(AsyncChannelsRaw(context, request, cq, tag));
    }
    std::unique_ptr< ::grpc::ClientAsyncReader< ::dc2::ChatChannel>> PrepareAsyncChannels(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncReader< ::dc2::ChatChannel>>(PrepareAsyncChannelsRaw(context, request, cq));
    }
    ::grpc::Status ChannelInfo(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::dc2::ChatChannel* response) override;
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::ChatChannel>> AsyncChannelInfo(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::ChatChannel>>(AsyncChannelInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::ChatChannel>> PrepareAsyncChannelInfo(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::ChatChannel>>(PrepareAsyncChannelInfoRaw(context, request, cq));
    }
    ::grpc::Status SetChannelOptions(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::dc2::Empty* response) override;
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::Empty>> AsyncSetChannelOptions(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::Empty>>(AsyncSetChannelOptionsRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::Empty>> PrepareAsyncSetChannelOptions(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::Empty>>(PrepareAsyncSetChannelOptionsRaw(context, request, cq));
    }

   private:
    std::shared_ptr< ::grpc::ChannelInterface> channel_;
    ::grpc::ClientReader< ::dc2::ChatChannel>* ChannelsRaw(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request) override;
    ::grpc::ClientAsyncReader< ::dc2::ChatChannel>* AsyncChannelsRaw(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request, ::grpc::CompletionQueue* cq, void* tag) override;
    ::grpc::ClientAsyncReader< ::dc2::ChatChannel>* PrepareAsyncChannelsRaw(::grpc::ClientContext* context, const ::dc2::ChannelsReq& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::dc2::ChatChannel>* AsyncChannelInfoRaw(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::dc2::ChatChannel>* PrepareAsyncChannelInfoRaw(::grpc::ClientContext* context, const ::dc2::ChannelInfoReq& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::dc2::Empty>* AsyncSetChannelOptionsRaw(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::dc2::Empty>* PrepareAsyncSetChannelOptionsRaw(::grpc::ClientContext* context, const ::dc2::SetChannelOptionsReq& request, ::grpc::CompletionQueue* cq) override;
    const ::grpc::RpcMethod rpcmethod_Channels_;
    const ::grpc::RpcMethod rpcmethod_ChannelInfo_;
    const ::grpc::RpcMethod rpcmethod_SetChannelOptions_;
  };
  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());

  class Service : public ::grpc::Service {
   public:
    Service();
    virtual ~Service();
    // Channels enumerates channels registered on the server.
    //
    // It can work in streaming (if watch flag is set) or pagination mode.
    //
    // In streaming mode GetChannel never closes the stream,
    // sending all incremental updates of channel list.
    //
    // In pagination mode stream closes then specified limit is
    // reached, or enumeration reaches the end of the list.
    //
    // Server implementation should send at least SID, name and flags of the channel.
    // Other fields may be returned by ChannelInfo.
    virtual ::grpc::Status Channels(::grpc::ServerContext* context, const ::dc2::ChannelsReq* request, ::grpc::ServerWriter< ::dc2::ChatChannel>* writer);
    // ChannelInfo returns detailed info about the channel specified.
    virtual ::grpc::Status ChannelInfo(::grpc::ServerContext* context, const ::dc2::ChannelInfoReq* request, ::dc2::ChatChannel* response);
    // SetChannelOptions is mostly used to set join/leave statuses on channels.
    virtual ::grpc::Status SetChannelOptions(::grpc::ServerContext* context, const ::dc2::SetChannelOptionsReq* request, ::dc2::Empty* response);
  };
  template <class BaseClass>
  class WithAsyncMethod_Channels : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithAsyncMethod_Channels() {
      ::grpc::Service::MarkMethodAsync(0);
    }
    ~WithAsyncMethod_Channels() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Channels(::grpc::ServerContext* context, const ::dc2::ChannelsReq* request, ::grpc::ServerWriter< ::dc2::ChatChannel>* writer) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestChannels(::grpc::ServerContext* context, ::dc2::ChannelsReq* request, ::grpc::ServerAsyncWriter< ::dc2::ChatChannel>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag);
    }
  };
  template <class BaseClass>
  class WithAsyncMethod_ChannelInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithAsyncMethod_ChannelInfo() {
      ::grpc::Service::MarkMethodAsync(1);
    }
    ~WithAsyncMethod_ChannelInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status ChannelInfo(::grpc::ServerContext* context, const ::dc2::ChannelInfoReq* request, ::dc2::ChatChannel* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestChannelInfo(::grpc::ServerContext* context, ::dc2::ChannelInfoReq* request, ::grpc::ServerAsyncResponseWriter< ::dc2::ChatChannel>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
    }
  };
  template <class BaseClass>
  class WithAsyncMethod_SetChannelOptions : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithAsyncMethod_SetChannelOptions() {
      ::grpc::Service::MarkMethodAsync(2);
    }
    ~WithAsyncMethod_SetChannelOptions() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status SetChannelOptions(::grpc::ServerContext* context, const ::dc2::SetChannelOptionsReq* request, ::dc2::Empty* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestSetChannelOptions(::grpc::ServerContext* context, ::dc2::SetChannelOptionsReq* request, ::grpc::ServerAsyncResponseWriter< ::dc2::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag);
    }
  };
  typedef WithAsyncMethod_Channels<WithAsyncMethod_ChannelInfo<WithAsyncMethod_SetChannelOptions<Service > > > AsyncService;
  template <class BaseClass>
  class WithGenericMethod_Channels : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithGenericMethod_Channels() {
      ::grpc::Service::MarkMethodGeneric(0);
    }
    ~WithGenericMethod_Channels() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Channels(::grpc::ServerContext* context, const ::dc2::ChannelsReq* request, ::grpc::ServerWriter< ::dc2::ChatChannel>* writer) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithGenericMethod_ChannelInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithGenericMethod_ChannelInfo() {
      ::grpc::Service::MarkMethodGeneric(1);
    }
    ~WithGenericMethod_ChannelInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status ChannelInfo(::grpc::ServerContext* context, const ::dc2::ChannelInfoReq* request, ::dc2::ChatChannel* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithGenericMethod_SetChannelOptions : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithGenericMethod_SetChannelOptions() {
      ::grpc::Service::MarkMethodGeneric(2);
    }
    ~WithGenericMethod_SetChannelOptions() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status SetChannelOptions(::grpc::ServerContext* context, const ::dc2::SetChannelOptionsReq* request, ::dc2::Empty* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithStreamedUnaryMethod_ChannelInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithStreamedUnaryMethod_ChannelInfo() {
      ::grpc::Service::MarkMethodStreamed(1,
        new ::grpc::StreamedUnaryHandler< ::dc2::ChannelInfoReq, ::dc2::ChatChannel>(std::bind(&WithStreamedUnaryMethod_ChannelInfo<BaseClass>::StreamedChannelInfo, this, std::placeholders::_1, std::placeholders::_2)));
    }
    ~WithStreamedUnaryMethod_ChannelInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable regular version of this method
    ::grpc::Status ChannelInfo(::grpc::ServerContext* context, const ::dc2::ChannelInfoReq* request, ::dc2::ChatChannel* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    // replace default version of method with streamed unary
    virtual ::grpc::Status StreamedChannelInfo(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dc2::ChannelInfoReq,::dc2::ChatChannel>* server_unary_streamer) = 0;
  };
  template <class BaseClass>
  class WithStreamedUnaryMethod_SetChannelOptions : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithStreamedUnaryMethod_SetChannelOptions() {
      ::grpc::Service::MarkMethodStreamed(2,
        new ::grpc::StreamedUnaryHandler< ::dc2::SetChannelOptionsReq, ::dc2::Empty>(std::bind(&WithStreamedUnaryMethod_SetChannelOptions<BaseClass>::StreamedSetChannelOptions, this, std::placeholders::_1, std::placeholders::_2)));
    }
    ~WithStreamedUnaryMethod_SetChannelOptions() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable regular version of this method
    ::grpc::Status SetChannelOptions(::grpc::ServerContext* context, const ::dc2::SetChannelOptionsReq* request, ::dc2::Empty* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    // replace default version of method with streamed unary
    virtual ::grpc::Status StreamedSetChannelOptions(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dc2::SetChannelOptionsReq,::dc2::Empty>* server_unary_streamer) = 0;
  };
  typedef WithStreamedUnaryMethod_ChannelInfo<WithStreamedUnaryMethod_SetChannelOptions<Service > > StreamedUnaryService;
  template <class BaseClass>
  class WithSplitStreamingMethod_Channels : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithSplitStreamingMethod_Channels() {
      ::grpc::Service::MarkMethodStreamed(0,
        new ::grpc::SplitServerStreamingHandler< ::dc2::ChannelsReq, ::dc2::ChatChannel>(std::bind(&WithSplitStreamingMethod_Channels<BaseClass>::StreamedChannels, this, std::placeholders::_1, std::placeholders::_2)));
    }
    ~WithSplitStreamingMethod_Channels() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable regular version of this method
    ::grpc::Status Channels(::grpc::ServerContext* context, const ::dc2::ChannelsReq* request, ::grpc::ServerWriter< ::dc2::ChatChannel>* writer) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    // replace default version of method with split streamed
    virtual ::grpc::Status StreamedChannels(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::dc2::ChannelsReq,::dc2::ChatChannel>* server_split_streamer) = 0;
  };
  typedef WithSplitStreamingMethod_Channels<Service > SplitStreamedService;
  typedef WithSplitStreamingMethod_Channels<WithStreamedUnaryMethod_ChannelInfo<WithStreamedUnaryMethod_SetChannelOptions<Service > > > StreamedService;
};

class Chat final {
 public:
  static constexpr char const* service_full_name() {
    return "dc2.Chat";
  }
  class StubInterface {
   public:
    virtual ~StubInterface() {}
    // StreamMessages is used to send and receive chat messages from all rooms.
    //
    // Messages are filtered by server based on ChatHub.SetChannelOptions
    // to notify client only about messages from channels they joined to.
    //
    // For direct P2P connections user and channel fields can be omitted,
    // since peers can identify each-other by handshake.
    //
    // Only one StreamMessages request should be active. Sending the second one
    // should cancel previous request.
    std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>> StreamMessages(::grpc::ClientContext* context) {
      return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>>(StreamMessagesRaw(context));
    }
    std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>> AsyncStreamMessages(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>>(AsyncStreamMessagesRaw(context, cq, tag));
    }
    std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>> PrepareAsyncStreamMessages(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>>(PrepareAsyncStreamMessagesRaw(context, cq));
    }
  private:
    virtual ::grpc::ClientReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>* StreamMessagesRaw(::grpc::ClientContext* context) = 0;
    virtual ::grpc::ClientAsyncReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>* AsyncStreamMessagesRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
    virtual ::grpc::ClientAsyncReaderWriterInterface< ::dc2::ChatMessage, ::dc2::ChatMessage>* PrepareAsyncStreamMessagesRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0;
  };
  class Stub final : public StubInterface {
   public:
    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
    std::unique_ptr< ::grpc::ClientReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>> StreamMessages(::grpc::ClientContext* context) {
      return std::unique_ptr< ::grpc::ClientReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>>(StreamMessagesRaw(context));
    }
    std::unique_ptr<  ::grpc::ClientAsyncReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>> AsyncStreamMessages(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>>(AsyncStreamMessagesRaw(context, cq, tag));
    }
    std::unique_ptr<  ::grpc::ClientAsyncReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>> PrepareAsyncStreamMessages(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>>(PrepareAsyncStreamMessagesRaw(context, cq));
    }

   private:
    std::shared_ptr< ::grpc::ChannelInterface> channel_;
    ::grpc::ClientReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>* StreamMessagesRaw(::grpc::ClientContext* context) override;
    ::grpc::ClientAsyncReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>* AsyncStreamMessagesRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
    ::grpc::ClientAsyncReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>* PrepareAsyncStreamMessagesRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
    const ::grpc::RpcMethod rpcmethod_StreamMessages_;
  };
  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());

  class Service : public ::grpc::Service {
   public:
    Service();
    virtual ~Service();
    // StreamMessages is used to send and receive chat messages from all rooms.
    //
    // Messages are filtered by server based on ChatHub.SetChannelOptions
    // to notify client only about messages from channels they joined to.
    //
    // For direct P2P connections user and channel fields can be omitted,
    // since peers can identify each-other by handshake.
    //
    // Only one StreamMessages request should be active. Sending the second one
    // should cancel previous request.
    virtual ::grpc::Status StreamMessages(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>* stream);
  };
  template <class BaseClass>
  class WithAsyncMethod_StreamMessages : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithAsyncMethod_StreamMessages() {
      ::grpc::Service::MarkMethodAsync(0);
    }
    ~WithAsyncMethod_StreamMessages() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status StreamMessages(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>* stream) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestStreamMessages(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
    }
  };
  typedef WithAsyncMethod_StreamMessages<Service > AsyncService;
  template <class BaseClass>
  class WithGenericMethod_StreamMessages : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithGenericMethod_StreamMessages() {
      ::grpc::Service::MarkMethodGeneric(0);
    }
    ~WithGenericMethod_StreamMessages() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status StreamMessages(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::dc2::ChatMessage, ::dc2::ChatMessage>* stream) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  typedef Service StreamedUnaryService;
  typedef Service SplitStreamedService;
  typedef Service StreamedService;
};

// Identity is a client-exposed service.
// TODO: requires p2p streaming over grpc
class Identity final {
 public:
  static constexpr char const* service_full_name() {
    return "dc2.Identity";
  }
  class StubInterface {
   public:
    virtual ~StubInterface() {}
    virtual ::grpc::Status Info(::grpc::ClientContext* context, const ::dc2::Empty& request, ::dc2::User* response) = 0;
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>> AsyncInfo(::grpc::ClientContext* context, const ::dc2::Empty& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>>(AsyncInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>> PrepareAsyncInfo(::grpc::ClientContext* context, const ::dc2::Empty& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>>(PrepareAsyncInfoRaw(context, request, cq));
    }
  private:
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>* AsyncInfoRaw(::grpc::ClientContext* context, const ::dc2::Empty& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>* PrepareAsyncInfoRaw(::grpc::ClientContext* context, const ::dc2::Empty& request, ::grpc::CompletionQueue* cq) = 0;
  };
  class Stub final : public StubInterface {
   public:
    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
    ::grpc::Status Info(::grpc::ClientContext* context, const ::dc2::Empty& request, ::dc2::User* response) override;
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::User>> AsyncInfo(::grpc::ClientContext* context, const ::dc2::Empty& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::User>>(AsyncInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::User>> PrepareAsyncInfo(::grpc::ClientContext* context, const ::dc2::Empty& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::User>>(PrepareAsyncInfoRaw(context, request, cq));
    }

   private:
    std::shared_ptr< ::grpc::ChannelInterface> channel_;
    ::grpc::ClientAsyncResponseReader< ::dc2::User>* AsyncInfoRaw(::grpc::ClientContext* context, const ::dc2::Empty& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::dc2::User>* PrepareAsyncInfoRaw(::grpc::ClientContext* context, const ::dc2::Empty& request, ::grpc::CompletionQueue* cq) override;
    const ::grpc::RpcMethod rpcmethod_Info_;
  };
  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());

  class Service : public ::grpc::Service {
   public:
    Service();
    virtual ~Service();
    virtual ::grpc::Status Info(::grpc::ServerContext* context, const ::dc2::Empty* request, ::dc2::User* response);
  };
  template <class BaseClass>
  class WithAsyncMethod_Info : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithAsyncMethod_Info() {
      ::grpc::Service::MarkMethodAsync(0);
    }
    ~WithAsyncMethod_Info() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Info(::grpc::ServerContext* context, const ::dc2::Empty* request, ::dc2::User* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestInfo(::grpc::ServerContext* context, ::dc2::Empty* request, ::grpc::ServerAsyncResponseWriter< ::dc2::User>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
    }
  };
  typedef WithAsyncMethod_Info<Service > AsyncService;
  template <class BaseClass>
  class WithGenericMethod_Info : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithGenericMethod_Info() {
      ::grpc::Service::MarkMethodGeneric(0);
    }
    ~WithGenericMethod_Info() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Info(::grpc::ServerContext* context, const ::dc2::Empty* request, ::dc2::User* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithStreamedUnaryMethod_Info : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithStreamedUnaryMethod_Info() {
      ::grpc::Service::MarkMethodStreamed(0,
        new ::grpc::StreamedUnaryHandler< ::dc2::Empty, ::dc2::User>(std::bind(&WithStreamedUnaryMethod_Info<BaseClass>::StreamedInfo, this, std::placeholders::_1, std::placeholders::_2)));
    }
    ~WithStreamedUnaryMethod_Info() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable regular version of this method
    ::grpc::Status Info(::grpc::ServerContext* context, const ::dc2::Empty* request, ::dc2::User* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    // replace default version of method with streamed unary
    virtual ::grpc::Status StreamedInfo(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dc2::Empty,::dc2::User>* server_unary_streamer) = 0;
  };
  typedef WithStreamedUnaryMethod_Info<Service > StreamedUnaryService;
  typedef Service SplitStreamedService;
  typedef WithStreamedUnaryMethod_Info<Service > StreamedService;
};

class UsersHub final {
 public:
  static constexpr char const* service_full_name() {
    return "dc2.UsersHub";
  }
  class StubInterface {
   public:
    virtual ~StubInterface() {}
    // UserInfo returns an information about specified user.
    // If SID is empty, it will return an information about current user.
    // It can be used to get SID of the client.
    virtual ::grpc::Status UserInfo(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::dc2::User* response) = 0;
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>> AsyncUserInfo(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>>(AsyncUserInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>> PrepareAsyncUserInfo(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>>(PrepareAsyncUserInfoRaw(context, request, cq));
    }
    // UpdateInfo send an updated information about current user to the server.
    // Hubs may reject any other requests until user identifies itself.
    // TODO: will be replaced by Identity service, probably
    virtual ::grpc::Status UpdateInfo(::grpc::ClientContext* context, const ::dc2::User& request, ::dc2::SIDMsg* response) = 0;
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::SIDMsg>> AsyncUpdateInfo(::grpc::ClientContext* context, const ::dc2::User& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::SIDMsg>>(AsyncUpdateInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::SIDMsg>> PrepareAsyncUpdateInfo(::grpc::ClientContext* context, const ::dc2::User& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dc2::SIDMsg>>(PrepareAsyncUpdateInfoRaw(context, request, cq));
    }
    // Users returns a list of active users and streams any updates of their info
    // if watch flag is set.
    std::unique_ptr< ::grpc::ClientReaderInterface< ::dc2::User>> Users(::grpc::ClientContext* context, const ::dc2::UsersReq& request) {
      return std::unique_ptr< ::grpc::ClientReaderInterface< ::dc2::User>>(UsersRaw(context, request));
    }
    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dc2::User>> AsyncUsers(::grpc::ClientContext* context, const ::dc2::UsersReq& request, ::grpc::CompletionQueue* cq, void* tag) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dc2::User>>(AsyncUsersRaw(context, request, cq, tag));
    }
    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dc2::User>> PrepareAsyncUsers(::grpc::ClientContext* context, const ::dc2::UsersReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dc2::User>>(PrepareAsyncUsersRaw(context, request, cq));
    }
  private:
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>* AsyncUserInfoRaw(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::User>* PrepareAsyncUserInfoRaw(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::SIDMsg>* AsyncUpdateInfoRaw(::grpc::ClientContext* context, const ::dc2::User& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::dc2::SIDMsg>* PrepareAsyncUpdateInfoRaw(::grpc::ClientContext* context, const ::dc2::User& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientReaderInterface< ::dc2::User>* UsersRaw(::grpc::ClientContext* context, const ::dc2::UsersReq& request) = 0;
    virtual ::grpc::ClientAsyncReaderInterface< ::dc2::User>* AsyncUsersRaw(::grpc::ClientContext* context, const ::dc2::UsersReq& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
    virtual ::grpc::ClientAsyncReaderInterface< ::dc2::User>* PrepareAsyncUsersRaw(::grpc::ClientContext* context, const ::dc2::UsersReq& request, ::grpc::CompletionQueue* cq) = 0;
  };
  class Stub final : public StubInterface {
   public:
    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
    ::grpc::Status UserInfo(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::dc2::User* response) override;
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::User>> AsyncUserInfo(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::User>>(AsyncUserInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::User>> PrepareAsyncUserInfo(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::User>>(PrepareAsyncUserInfoRaw(context, request, cq));
    }
    ::grpc::Status UpdateInfo(::grpc::ClientContext* context, const ::dc2::User& request, ::dc2::SIDMsg* response) override;
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::SIDMsg>> AsyncUpdateInfo(::grpc::ClientContext* context, const ::dc2::User& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::SIDMsg>>(AsyncUpdateInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::SIDMsg>> PrepareAsyncUpdateInfo(::grpc::ClientContext* context, const ::dc2::User& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dc2::SIDMsg>>(PrepareAsyncUpdateInfoRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientReader< ::dc2::User>> Users(::grpc::ClientContext* context, const ::dc2::UsersReq& request) {
      return std::unique_ptr< ::grpc::ClientReader< ::dc2::User>>(UsersRaw(context, request));
    }
    std::unique_ptr< ::grpc::ClientAsyncReader< ::dc2::User>> AsyncUsers(::grpc::ClientContext* context, const ::dc2::UsersReq& request, ::grpc::CompletionQueue* cq, void* tag) {
      return std::unique_ptr< ::grpc::ClientAsyncReader< ::dc2::User>>(AsyncUsersRaw(context, request, cq, tag));
    }
    std::unique_ptr< ::grpc::ClientAsyncReader< ::dc2::User>> PrepareAsyncUsers(::grpc::ClientContext* context, const ::dc2::UsersReq& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncReader< ::dc2::User>>(PrepareAsyncUsersRaw(context, request, cq));
    }

   private:
    std::shared_ptr< ::grpc::ChannelInterface> channel_;
    ::grpc::ClientAsyncResponseReader< ::dc2::User>* AsyncUserInfoRaw(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::dc2::User>* PrepareAsyncUserInfoRaw(::grpc::ClientContext* context, const ::dc2::SIDMsg& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::dc2::SIDMsg>* AsyncUpdateInfoRaw(::grpc::ClientContext* context, const ::dc2::User& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::dc2::SIDMsg>* PrepareAsyncUpdateInfoRaw(::grpc::ClientContext* context, const ::dc2::User& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientReader< ::dc2::User>* UsersRaw(::grpc::ClientContext* context, const ::dc2::UsersReq& request) override;
    ::grpc::ClientAsyncReader< ::dc2::User>* AsyncUsersRaw(::grpc::ClientContext* context, const ::dc2::UsersReq& request, ::grpc::CompletionQueue* cq, void* tag) override;
    ::grpc::ClientAsyncReader< ::dc2::User>* PrepareAsyncUsersRaw(::grpc::ClientContext* context, const ::dc2::UsersReq& request, ::grpc::CompletionQueue* cq) override;
    const ::grpc::RpcMethod rpcmethod_UserInfo_;
    const ::grpc::RpcMethod rpcmethod_UpdateInfo_;
    const ::grpc::RpcMethod rpcmethod_Users_;
  };
  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());

  class Service : public ::grpc::Service {
   public:
    Service();
    virtual ~Service();
    // UserInfo returns an information about specified user.
    // If SID is empty, it will return an information about current user.
    // It can be used to get SID of the client.
    virtual ::grpc::Status UserInfo(::grpc::ServerContext* context, const ::dc2::SIDMsg* request, ::dc2::User* response);
    // UpdateInfo send an updated information about current user to the server.
    // Hubs may reject any other requests until user identifies itself.
    // TODO: will be replaced by Identity service, probably
    virtual ::grpc::Status UpdateInfo(::grpc::ServerContext* context, const ::dc2::User* request, ::dc2::SIDMsg* response);
    // Users returns a list of active users and streams any updates of their info
    // if watch flag is set.
    virtual ::grpc::Status Users(::grpc::ServerContext* context, const ::dc2::UsersReq* request, ::grpc::ServerWriter< ::dc2::User>* writer);
  };
  template <class BaseClass>
  class WithAsyncMethod_UserInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithAsyncMethod_UserInfo() {
      ::grpc::Service::MarkMethodAsync(0);
    }
    ~WithAsyncMethod_UserInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status UserInfo(::grpc::ServerContext* context, const ::dc2::SIDMsg* request, ::dc2::User* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestUserInfo(::grpc::ServerContext* context, ::dc2::SIDMsg* request, ::grpc::ServerAsyncResponseWriter< ::dc2::User>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
    }
  };
  template <class BaseClass>
  class WithAsyncMethod_UpdateInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithAsyncMethod_UpdateInfo() {
      ::grpc::Service::MarkMethodAsync(1);
    }
    ~WithAsyncMethod_UpdateInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status UpdateInfo(::grpc::ServerContext* context, const ::dc2::User* request, ::dc2::SIDMsg* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestUpdateInfo(::grpc::ServerContext* context, ::dc2::User* request, ::grpc::ServerAsyncResponseWriter< ::dc2::SIDMsg>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
    }
  };
  template <class BaseClass>
  class WithAsyncMethod_Users : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithAsyncMethod_Users() {
      ::grpc::Service::MarkMethodAsync(2);
    }
    ~WithAsyncMethod_Users() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Users(::grpc::ServerContext* context, const ::dc2::UsersReq* request, ::grpc::ServerWriter< ::dc2::User>* writer) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestUsers(::grpc::ServerContext* context, ::dc2::UsersReq* request, ::grpc::ServerAsyncWriter< ::dc2::User>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
    }
  };
  typedef WithAsyncMethod_UserInfo<WithAsyncMethod_UpdateInfo<WithAsyncMethod_Users<Service > > > AsyncService;
  template <class BaseClass>
  class WithGenericMethod_UserInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithGenericMethod_UserInfo() {
      ::grpc::Service::MarkMethodGeneric(0);
    }
    ~WithGenericMethod_UserInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status UserInfo(::grpc::ServerContext* context, const ::dc2::SIDMsg* request, ::dc2::User* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithGenericMethod_UpdateInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithGenericMethod_UpdateInfo() {
      ::grpc::Service::MarkMethodGeneric(1);
    }
    ~WithGenericMethod_UpdateInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status UpdateInfo(::grpc::ServerContext* context, const ::dc2::User* request, ::dc2::SIDMsg* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithGenericMethod_Users : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithGenericMethod_Users() {
      ::grpc::Service::MarkMethodGeneric(2);
    }
    ~WithGenericMethod_Users() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Users(::grpc::ServerContext* context, const ::dc2::UsersReq* request, ::grpc::ServerWriter< ::dc2::User>* writer) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithStreamedUnaryMethod_UserInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithStreamedUnaryMethod_UserInfo() {
      ::grpc::Service::MarkMethodStreamed(0,
        new ::grpc::StreamedUnaryHandler< ::dc2::SIDMsg, ::dc2::User>(std::bind(&WithStreamedUnaryMethod_UserInfo<BaseClass>::StreamedUserInfo, this, std::placeholders::_1, std::placeholders::_2)));
    }
    ~WithStreamedUnaryMethod_UserInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable regular version of this method
    ::grpc::Status UserInfo(::grpc::ServerContext* context, const ::dc2::SIDMsg* request, ::dc2::User* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    // replace default version of method with streamed unary
    virtual ::grpc::Status StreamedUserInfo(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dc2::SIDMsg,::dc2::User>* server_unary_streamer) = 0;
  };
  template <class BaseClass>
  class WithStreamedUnaryMethod_UpdateInfo : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithStreamedUnaryMethod_UpdateInfo() {
      ::grpc::Service::MarkMethodStreamed(1,
        new ::grpc::StreamedUnaryHandler< ::dc2::User, ::dc2::SIDMsg>(std::bind(&WithStreamedUnaryMethod_UpdateInfo<BaseClass>::StreamedUpdateInfo, this, std::placeholders::_1, std::placeholders::_2)));
    }
    ~WithStreamedUnaryMethod_UpdateInfo() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable regular version of this method
    ::grpc::Status UpdateInfo(::grpc::ServerContext* context, const ::dc2::User* request, ::dc2::SIDMsg* response) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    // replace default version of method with streamed unary
    virtual ::grpc::Status StreamedUpdateInfo(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dc2::User,::dc2::SIDMsg>* server_unary_streamer) = 0;
  };
  typedef WithStreamedUnaryMethod_UserInfo<WithStreamedUnaryMethod_UpdateInfo<Service > > StreamedUnaryService;
  template <class BaseClass>
  class WithSplitStreamingMethod_Users : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service *service) {}
   public:
    WithSplitStreamingMethod_Users() {
      ::grpc::Service::MarkMethodStreamed(2,
        new ::grpc::SplitServerStreamingHandler< ::dc2::UsersReq, ::dc2::User>(std::bind(&WithSplitStreamingMethod_Users<BaseClass>::StreamedUsers, this, std::placeholders::_1, std::placeholders::_2)));
    }
    ~WithSplitStreamingMethod_Users() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable regular version of this method
    ::grpc::Status Users(::grpc::ServerContext* context, const ::dc2::UsersReq* request, ::grpc::ServerWriter< ::dc2::User>* writer) final override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    // replace default version of method with split streamed
    virtual ::grpc::Status StreamedUsers(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::dc2::UsersReq,::dc2::User>* server_split_streamer) = 0;
  };
  typedef WithSplitStreamingMethod_Users<Service > SplitStreamedService;
  typedef WithStreamedUnaryMethod_UserInfo<WithStreamedUnaryMethod_UpdateInfo<WithSplitStreamingMethod_Users<Service > > > StreamedService;
};

}  // namespace dc2


#endif  // GRPC_dc2_2eproto__INCLUDED
